from django.urls import path, re_path, include
from chartstest import views, ma10Views, ma20Views, macdViews, kxViews, baostockViews, downdataViews, cctvNewsViews, \
    digitalCashViews
from chartstest import averageViews

# 定义自己的 URL
urlpatterns = [
    # path('', views.index, name='index'),
    # 第二个参数叫 name，是为了给当前 path 起名字，用于反向解析
    path('', views.index, name='index'),  # path 不识别正则
    path('test/', views.index, name='index'),  # path 不识别正则
    path('jsonDate/', views.jsonDate, name='jsonDate'),  # path 不识别正则
    path('computedResult/', views.computedResult, name='computedResult'),
    path('detail/', views.detail, name='detail'),
    path('delDate/', views.delDate, name='delDate'),
    # 均线
    path('junxian/', averageViews.junxian, name='junxian'),
    path('junxianResult/', averageViews.junxianResult, name='junxianResult'),
    path('ma5Detail/', averageViews.ma5Detail, name='ma5Detail'),

    # ma10均线
    path('ma10Index/', ma10Views.ma10Index, name='ma10Index'),
    path('ma10Result/', ma10Views.ma10Result, name='ma10Result'),
    path('ma10Detail/', ma10Views.ma10Detail, name='ma10Detail'),

    # ma20均线
    path('ma20Index/', ma20Views.ma20Index, name='ma20Index'),
    path('ma20Result/', ma20Views.ma20Result, name='ma20Result'),
    path('ma20Detail/', ma20Views.ma20Detail, name='ma20Detail'),

    # kdj计算
    path('kdjIndex/', averageViews.kdjIndex, name='kdjIndex'),
    path('kdjResult/', averageViews.kdjResult, name='kdjResult'),
    path('kdjDetail/', averageViews.kdjDetail, name='kdjDetail'),

    # macd 加入0轴参数
    path('macdIndex/', macdViews.macdIndex, name='macdIndex'),  # path 不识别正则
    path('jsonDate/', macdViews.jsonDate, name='jsonDate'),  # path 不识别正则
    path('macdResult/', macdViews.macdResult, name='macdResult'),
    path('macdDetail/', macdViews.macdDetail, name='macdDetail'),

    # k线参数
    path('kxIndex/', kxViews.kxIndex, name='kxIndex'),  # path 不识别正则
    path('jsonDate/', kxViews.jsonDate, name='jsonDate'),  # path 不识别正则
    path('kxResult/', kxViews.kxResult, name='kxResult'),
    path('kxDetail/', kxViews.kxDetail, name='kxDetail'),
    # path('myExp/', views.myExp, name='myExp'),  # path 不识别正则

    # re_path(r'(\d+)', views.detail, name='detail'),  # 正则需要用 re_path
    # re_path(r'^(?P<id>[0-9]+)/$', views.detail, name='detail'),   # 正则命名组
    # path('', views.home, name='home'),

    # baostock数据源
    path('baostockIndex/', baostockViews.baostockIndex, name='baostockIndex'),  # path 不识别正则
    path('jsonDate/', baostockViews.jsonDate, name='jsonDate'),  # path 不识别正则
    path('bResult/', baostockViews.bResult, name='bResult'),
    path('bDetail/', baostockViews.bDetail, name='bDetail'),

    # baostock数据源
    path('downstockIndex/', downdataViews.downstockIndex, name='downstockIndex'),  # path 不识别正则
    path('downstockIndex/', downdataViews.downdataIndex, name='downdataIndex'),  # path 不识别正则
    path('jsonDate/', downdataViews.jsonDate, name='jsonDate'),  # path 不识别正则
    path('downdataResult/', downdataViews.downdataResult, name='downdataResult'),
    path('downdataDetail/', downdataViews.downdataDetail, name='downdataDetail'),

    # CCTV新闻数据
    path('cctvNewsDate/', cctvNewsViews.cctvNewsDate, name='cctvNewsDate'),

    # 数字货币
    path('digitalCashIndex/', digitalCashViews.digitalCashIndex, name='digitalCashIndex'),
    path('digital_date/', digitalCashViews.digital_date, name='digital_date'),
    path('downDate/', digitalCashViews.downDate, name='downDate'),





]
